package com.bawei.module_my.pj;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;

import android.os.Bundle;

import com.bawei.library_base.mvp.v.BaseActivity;
import com.bawei.module_my.R;
import com.bawei.module_my.pj.frag.WcFragment;
import com.bawei.module_my.pj.frag.WwcFragment;
import com.flyco.tablayout.SlidingTabLayout;

import java.util.ArrayList;

public class PjActivity extends BaseActivity {


    private SlidingTabLayout pjTab;
    private ViewPager pjVp;

    @Override
    public int beanLayout() {
        return R.layout.activity_pj;
    }

    @Override
    public void initView() {

        pjTab = (SlidingTabLayout) findViewById(R.id.pj_tab);
        pjVp = (ViewPager) findViewById(R.id.pj_vp);
    }

    @Override
    public void initData() {

        ArrayList<Fragment> fragments = new ArrayList<>();
        fragments.add(new WwcFragment());
        fragments.add(new WcFragment());

        pjTab.setViewPager(pjVp,new String[]{"评价","完成评价"},this,fragments);
    }
}